﻿@{ ViewBag.Title = "VideoJS in ASP.NET MVC"; }
@*VideoJS requires its script in the head element for 'HTML5 Shiv' support*@
@section Css {
    <link href="@Url.Content("~/Content/video-js.css")" rel="stylesheet" type="text/css" />
}
@section HeadJavaScript {
    <script src="@Url.Content("~/Scripts/video.js")" type="text/javascript"></script>
    <script type="text/javascript">
        //A reference to Flash object which will serve as 'HTML5 Shiv' if video element is not supported by browser.
        videojs.options.flash.swf = '@Url.Content("~/Swf/video-js.swf")';
    </script>
}
<!-- Begin VideoJS -->
<video id="videoBox" class="video-js vjs-default-skin" controls preload="none" width="640" height="264" poster="@Url.Content("~/Content/video/oceans-clip.png")" data-setup="{}">
    <source src="@Url.Action("OceansClip", new { @type = "mp4" })" type='video/mp4' />
    <source src="@Url.Action("OceansClip", new { @type = "webm" })" type='video/webm' />
    <source src="@Url.Action("OceansClip", new { @type = "ogg" })" type='video/ogg' />
</video>
<!-- End VideoJS -->

